package com.zhengjiang.nio;

import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

/**
 * @author zhengjiang
 * @version 1.0.0
 * @description
 * @date 2021/6/7
 **/
public class FilesTest {
    public static void main(String[] args) throws IOException {
//        Path path = Paths.get("FilesTest.java");
//        System.out.println(path.toAbsolutePath());
//        Files.copy(Paths.get("FilesTest.java"),new FileOutputStream("a.txt"));

        Files.list(Paths.get(".")).forEach(p-> System.out.println(p));
    }
}
